<include file="Public/header" />
<style>
nav.navbar{display:none;}
</style>
    <div class="container">

      <!-- Main component for a primary marketing message or call to action -->
      <div class="jumbotron">

<div class="panel panel-default">
  <!-- Default panel contents -->
<div class="panel-heading">搜索
</div>
<div class="panel-body">


<input id="name" class="form-control mb5" value="{$param.name}" placeholder="单位名">

<button type="button" id="serach" class="btn btn-success">搜索</button>
</div>
</div>
      <form id="del" method="post" class="form-signin" action='{:U("delete")}'>
	<table class="table table-striped">
        <thead>
          <tr>
            <th>单位编号</th>
            <th>单位名</th>
            <th>登记人数</th>
            <th>计算人数</th>
            <th>总分</th>
            <th>平均分</th>
            <th>操作</th>
            <!--<th></th>
            <td><button type="button" id="dotui" class="btn btn-info">留言</button></td>-->
          </tr>
        </thead>
        <tbody>
		<foreach name="list" item="vo" key="k" >
          <tr>
            <th scope="row">{$vo.id}</th>
            <td>{$vo.name}</td>
            <td>{$vo.pc}</td>
            <td>{$vo.count}</td>
            <td>{$vo.fra}</td>
            <td>{$vo['avg_fra']}</td>
            <td>
				<a href='{:U("export","id=$vo[id]")}'>导出答题人</a>
			</td>
          </tr>
		</foreach>
        </tbody>
      </table>
	<nav>
	  <ul class="pagination">
		{$page}
	  </ul>
	</nav>
	  </form>
      </div>

    </div> <!-- /container -->
<script>
	$('#serach').on('click',function(){
		var	name=$("#name").val().trim();
		var data = {
			act:'{$Think.const.CONTROLLER_NAME}/{$Think.const.ACTION_NAME}',
			param:{
				name:name
			}
		};
		$.ajax({
			url: '{:U("Base/geturl")}',
			type: 'POST',
			data:data,
			dataType: "json",
			success: function(obj){
				location.href=obj.href;
				//console.log(obj.href);
			}
		});
	});
	
</script>
<include file="public/footer" />